<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <title th:text="${wbeParameter.name}">网站后台管理系统 </title>
    <link rel="icon" href="/resource/hospital.png"/>
    <link rel="stylesheet" href="/resource/css/normalize.css" type="text/css"/>
    <link rel="stylesheet" href="/resource/css/secondary.css" type="text/css"/>
    <link rel="stylesheet" href="/resource/common/layui/css/layui.css" media="all"/>
    <script language="javascript" type="text/javascript" src="/resource/js/Kunyilibrary.js"></script>
</head>
<style>
    .office-content {
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
</style>
<body style="font-size: 12px">
<header class="header" th:replace="proscenium/public :: header"></header>
<nav th:replace="proscenium/public :: nav"></nav>
<section class="BaseMark">
    <div class="bread">您所在的位置<span><a href="/diplomaProject">首页</a>>
        <a></a> >个人中心</a></span>
    </div>
    <div class="baseLeft">
        <div class="partLeft">
            <div class="title partTitle"><a>安全设置</a></div>
            <div class="newsMenu depmMenu">
                <ul>
                    <li class="first"><a href="/userCenter"><em>挂号记录</em></a></li>
                    <li><a href="/userSet"><em>个人信息</em></a></li>
                    <li class="active"><a href="/safety"><em>安全设置</em></a></li>
                    <li><a href="/messagePage"><em>消息中心</em></a></li>
                </ul>
            </div>
        </div>
        <div class="tools">
            <a href="/pay">
                <img src="/resource/images/ico_003.gif" width="52" height="52"><em>缴费</em>
            </a>
            <a style="margin-right:0;" href="/infoSearch" class="last">
                <img src="/resource/images/ico_004.gif" width="52" height="52"><em>信息查询</em>
            </a>
            <a style="margin-right:0;" href="/showHistory">
                <img src="/resource/images/ico_001.gif" width="52" height="52"><em>缴费记录</em>
            </a>
            <div class="clear"></div>
        </div>
    </div>
    <div class="partRight">
        <div class="title01">安全设置</div>
        <div class="Expert layui-form" style="padding-top: 40px;width: 50%">
            <div class="layui-form-item">
                <label class="layui-form-label">旧密码:</label>
                <div class="layui-input-block">
                    <input type="password" name="oldPas" lay-verify="required|pass" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">新密码:</label>
                <div class="layui-input-block">
                    <input type="password" name="newPas" lay-verify="required|pass" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">确认密码:</label>
                <div class="layui-input-block">
                    <input type="password" name="confirmPas" lay-verify="required|pass" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-btn-normal" style="width: 200px;background: #6bcbca" lay-submit=""
                            lay-filter="changePwd">
                        保存内容
                    </button>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
</section>
<div class="BottomHidden"></div>
<footer th:replace="proscenium/public :: footer"></footer>
<script language="javascript" type="text/javascript" src="/resource/js/Kunyi.Common.js"></script>
<script language="javascript" type="text/javascript" src="/resource/js/Kunyi.Secondary.js"></script>
<script type="text/javascript" src="/resource/common/layui/layui.js"></script>
<script type="text/javascript">
    layui.use(['table', 'layer', 'laydate', 'form'], function () {
        var table = layui.table,
            $ = layui.$,
            layer = layui.layer,
            form = layui.form;
        //自定义验证规则
        form.verify({
            pass: [/^[\S]{6,12}$/, '密码必须6到12位，且不能出现空格']
        });
        form.on('submit(changePwd)', function (data) {
            if (data.field.newPas != data.field.confirmPas) {
                parent.layer.msg('两次密码输入不一致', {icon: 5});
                return false;
            }
            $.ajax({
                url: '/updatePas',
                type: 'post',
                data: data.field,
                dataType: 'json',
                async: false,
                success: function (result) {
                    if (!result.status) {
                        parent.layer.msg(result.msg, {time: 2000});
                        return false;
                    } else {
                        layer.msg("修改成功!", {
                            time: 900, end: function () {
                                location.reload()
                            }
                        })

                    }
                }

            });
        });
    });

</script>
</body>
</html>